package com.zhangpingyang.springcloud.feignservice.controller;

import com.zhangpingyang.springcloud.feignservice.api.UserService;
import com.zhangpingyang.springcloud.feignservice.domain.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Zhang Pingyang
 * @Date: 2019/11/27 19:33
 */
@RestController
@RequestMapping("/user")
public class UserFeignController {
    @Autowired
    private UserService userService;

    @GetMapping("{id}")
    public CommonResult getUser(@PathVariable Long id) {
        return userService.getUser(id);
    }

}
